package gcontent.action;

import java.io.FileInputStream;
import java.util.Date;
import gcontent.db.statistics.Statistics;
import com.opensymphony.xwork2.ActionSupport;

public class NewUser extends ActionSupport {
	private static final long serialVersionUID = 1L;	
	private String user = "";
	private String password = "";
	private String Searcher = "Searcher";
	private int VisitCount = 1;
	private Date CurrentDate = new Date();
	
	public String execute() {
		this.addVisit();
		return SUCCESS;
	}
	
	/**
	 * Register one visit
	 */
	private void addVisit() {
		try {
			Statistics st = new Statistics();
			st.AddVisit();
		} catch (Exception e) {
			e.printStackTrace();
		}	
	}
	
	public String getUser() {
		return user;
	}
	
	public void setUser(String user) {
		this.user = user;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getSearcher() {
		return Searcher;
	}
	
	public void setSearcher(String searchAction) {
		Searcher = searchAction;
	}
	
	public int getVisitCount() {
		return VisitCount;
	}
	
	public void setVisitCount(int visitCount) {
		VisitCount = visitCount;
	}
	
	public Date getCurrentDate() {
		return CurrentDate;
	}
	
	public void setCurrentDate(Date currentDate) {
		CurrentDate = currentDate;
	}
}
